package com.zdkj.subway.stm.enums;

/**
 * @author songtuo
 * @create 2020-07-08 15:47
 */
public enum TicketInputEnum {
    NOT_SUBMIT("0", 0, "未提交"),
    SUBMIT("1", 0, "已提交"),
    IS_YES("0", 1, "是"),
    IS_NO("1", 1, "否"),
    MORNING("0", 2, "早班"),
    ENENING("1", 2, "晚班");
    private String code;
    private Integer type;
    private String descr;

    TicketInputEnum(String code,Integer type, String descr) {
        this.code = code;
        this.type = type;
        this.descr = descr;
    }

    public static String getDescrByCode(String code, Integer type) {
        TicketInputEnum[] values = TicketInputEnum.values();
        for (TicketInputEnum value : values) {
            if (value.code.equals(code) && value.type.equals(type)) {
                return value.descr;
            }
        }
        return null;
    }

}